package org.exez.modules.visitor.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.exez.modules.visitor.entity.ReservationApplicationCopy;
import org.exez.modules.visitor.mapper.ReservationApplicationCopyMapper;
import org.exez.modules.visitor.service.IReservationApplicationCopyService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 外侧访客申请记录
 * @Author: exez-boot
 * @Date:   2020-08-13
 * @Version: V1.0
 */
@Service
public class ReservationApplicationCopyServiceImpl extends ServiceImpl<ReservationApplicationCopyMapper, ReservationApplicationCopy> implements IReservationApplicationCopyService {

    @Override
    public void updatePushStatus(List<Integer> ids) {
        List<ReservationApplicationCopy> reservationApplicationCopyList =new ArrayList();

        for (Integer id : ids) {
            ReservationApplicationCopy reservationApplicationCopy = new ReservationApplicationCopy();
            reservationApplicationCopy.setId(id);
            reservationApplicationCopy.setPushStatus(1);
            reservationApplicationCopyList.add(reservationApplicationCopy);
        }
        updateBatchById(reservationApplicationCopyList);
    }
}
